<div class="clear_both"></div>
<div class="main_container">
<table cellspacing="0" cellpadding="5">
<tr>
	<td>Payroll Period</td>
	<td>
		<select id="period" name="period">
			<option value="">-- Select --</option>
		<?php foreach($periods as $p):?>
			<option value="<?php echo $p->id?>"><?php echo DateUtils::formatDate($p->date_start, ConstantsUtils::$DATE_FRIENDLY_FORMAT). " to " .DateUtils::formatDate($p->date_end, ConstantsUtils::$DATE_FRIENDLY_FORMAT) ;?></option>
		<?php endforeach;?>
		</select>
	</td>
</tr>
</table>
<script language="javascript">
var path = "<?php echo base_url()?>timesheet/summary_period/";
$(document).ready(function() {

	$("#period").change(function(){
		var url = path + parseInt($(this).val());
		document.location = url;
	})
	
} );
</script>
</div>